<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link th:href="@{/ajax/libs/jquery-layout/jquery.layout-latest.css}" rel="stylesheet"/>
<link rel="stylesheet" href="/static/ajax/libs/summernote/summernote.css"
      th:href="@{/ajax/libs/summernote/summernote.css}">
<link rel="stylesheet" href="/static/ajax/libs/summernote/summernote-bs3.css"
      th:href="@{/ajax/libs/summernote/summernote-bs3.css}">
<link rel="stylesheet" href="/static/ajax/libs/bootstrap-tags-input/bootstrap-tagsinput.css"
      th:href="@{/ajax/libs/bootstrap-tags-input/bootstrap-tagsinput.css}">
<link href="/static/ajax/libs/smartWizard/smart_wizard_theme_circles.min.css"
      th:href="@{/ajax/libs/smartWizard/smart_wizard_theme_circles.min.css}" rel="stylesheet" type="text/css"/>
<style>
    .linksDetails li {
        margin-top: 10px;
    }
</style>
<body class="gray-bg">
<div class="container">
    <!-- External toolbar sample -->
    <div class="row d-flex align-items-center p-3 my-3 text-white-50">
        <div class="col-12 col-lg-6 col-sm-12">
            <label>Theme:</label>
            <select id="theme_selector" class="custom-select col-lg-6 col-sm-12">
                <option value="default">default</option>
                <option value="arrows">arrows</option>
                <option value="circles">circles</option>
                <option value="dots">dots</option>
            </select>
        </div>
        <div class="col-12 col-lg-6 col-sm-12">
            <label>External Buttons:</label>
            <div class="btn-group col-lg-6 col-sm-12" role="group">
                <button class="btn btn-secondary" id="prev-btn" type="button">Go Previous</button>
                <button class="btn btn-secondary" id="next-btn" type="button">Go Next</button>
                <button class="btn btn-danger" id="reset-btn" type="button">Reset Wizard</button>
            </div>
        </div>
    </div>

    <!-- SmartWizard html -->
    <div id="smartwizard">
        <ul>
            <li><a href="#step-1">Step 1<br /><small>This is step description</small></a></li>
            <li><a href="#step-2">Step 2<br /><small>This is step description</small></a></li>
            <li><a href="#step-3">Step 3<br /><small>This is step description</small></a></li>
            <li><a href="#step-4">Step 4<br /><small>This is step description</small></a></li>
        </ul>

        <div>
            <div id="step-1" class="">
                <h3 class="border-bottom border-gray pb-2">Step 1 Content</h3>
                Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
            </div>
            <div id="step-2" class="">
                <h3 class="border-bottom border-gray pb-2">Step 2 Content</h3>
                <div>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </div>
            </div>
            <div id="step-3" class="">
                Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
                Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

            </div>
            <div id="step-4" class="">
                <h3 class="border-bottom border-gray pb-2">Step 4 Content</h3>
                <div class="card">
                    <div class="card-header">My Details</div>
                    <div class="card-block p-0">
                        <table class="table">
                            <tbody>
                            <tr> <th>Name:</th> <td>Tim Smith</td> </tr>
                            <tr> <th>Email:</th> <td>example@example.com</td> </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>

<div th:include="include :: footer"></div>
<script src="/static/ajax/libs/summernote/summernote.min.js"
        th:src="@{/ajax/libs/summernote/summernote.min.js}"></script>
<script src="/static/ajax/libs/summernote/summernote.js"
        th:src="@{/ajax/libs/summernote/summernote.js}"></script>
<script src="/static/ajax/libs/summernote/summernote-ext-highlignt.js"
        th:src="@{/ajax/libs/summernote/summernote-ext-highlignt.js}"></script>
<script src="/static/ajax/libs/summernote/summernote-add-class.js"
        th:src="@{/ajax/libs/summernote/summernote-add-class.js}"></script>
<script src="/static/ajax/libs/bootstrap-tags-input/bootstrap-tagsinput.min.js"
        th:src="@{/ajax/libs/bootstrap-tags-input/bootstrap-tagsinput.min.js}"></script>
<script th:src="@{/ajax/libs/jquery-layout/jquery.layout-latest.js}"></script>
<script type="text/javascript" th:src="@{/ajax/libs/smartWizard/jquery.smartWizard.min.js}"
        src="/static/ajax/libs/smartWizard/jquery.smartWizard.min.js"></script>
<script>
    $(document).ready(function(){

        // Step show event
        $("#smartwizard").on("showStep", function(e, anchorObject, stepNumber, stepDirection, stepPosition) {
            //alert("You are on step "+stepNumber+" now");
            if(stepPosition === 'first'){
                $("#prev-btn").addClass('disabled');
            }else if(stepPosition === 'final'){
                $("#next-btn").addClass('disabled');
            }else{
                $("#prev-btn").removeClass('disabled');
                $("#next-btn").removeClass('disabled');
            }
        });

        // Toolbar extra buttons
        var btnFinish = $('<button></button>').text('Finish')
            .addClass('btn btn-info')
            .on('click', function(){ alert('Finish Clicked'); });
        var btnCancel = $('<button></button>').text('Cancel')
            .addClass('btn btn-danger')
            .on('click', function(){ $('#smartwizard').smartWizard("reset"); });


        // Smart Wizard
        $('#smartwizard').smartWizard({
            selected: 0,
            theme: 'default',
            transitionEffect:'fade',
            showStepURLhash: true,
            toolbarSettings: {toolbarPosition: 'both',
                toolbarButtonPosition: 'end',
                toolbarExtraButtons: [btnFinish, btnCancel]
            }
        });


        // External Button Events
        $("#reset-btn").on("click", function() {
            // Reset wizard
            $('#smartwizard').smartWizard("reset");
            return true;
        });

        $("#prev-btn").on("click", function() {
            // Navigate previous
            $('#smartwizard').smartWizard("prev");
            return true;
        });

        $("#next-btn").on("click", function() {
            // Navigate next
            $('#smartwizard').smartWizard("next");
            return true;
        });

        $("#theme_selector").on("change", function() {
            // Change theme
            $('#smartwizard').smartWizard("theme", $(this).val());
            return true;
        });

        // Set selected theme on page refresh
        $("#theme_selector").change();
    });
</script>
</body>

</html>